package com.open.capacity.notice.provider.core.constant;

/**
 * 通用okhttp异常枚举
 */
public enum ClientErrorEnum {
	NETWORK_ERROR(500, "未知错误，未能确定具体错误类型"), TIMEOUT_ERROR(408, "请求超时，服务器响应超时"), SERVER_ERROR(500, "服务器错误，服务器内部错误"),
	SSL_ERROR(525, "SSL错误，SSL握手失败"), IO_ERROR(500, "IO错误，读写数据时发生错误"), UNKNOWN_ERROR(500, "未知错误，未能确定具体错误类型"),;

	private int errorCode;

	private String errorMessage;

	ClientErrorEnum(int errorCode, String errorMessage) {
		this.errorCode = errorCode;
		this.errorMessage = errorMessage;
	}

	public int getErrorCode() {
		return errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

}